{template file="member/header.html"/}
<div class="layui-card pd-20 no-shadow">
    <div class="layui-card-header fly-title">
        <h2>在线投稿</h2>
    </div>
    <div class="layui-card-body">
        <form class="layui-form" method="post">
            {:token()}
            <div class="layui-form-item">
                <label class="layui-form-label">栏目分类</label>
                <div class="layui-input-block">
                    <select lay-filter="filter">
                        <option value="{:url('publish','step=2')}">请选择发布栏目</option>
                        {$categoryselect|raw}
                    </select>
                </div>
                <div class="layui-form-mid no-float layui-word-aux">请先选择栏目(阴影的表示没有权限)，选择栏目后页面会刷新。</div>
            </div>
            {include file="inputItem" /}
            {if isset($fieldList) && count($fieldList)}
            <input type="hidden" name="modelField[catid]" value="{$catid}">
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit data-type="layui-form" data-refresh="true">立即提交</button>
                </div>
            </div>
            {/if}
        </form>
    </div>
</div>
{template file="member/layui.html"/}
<script>
layui.use(['form', 'yznForm'], function() {
    var form = layui.form,
        yznForm = layui.yznForm;

    yznForm.bindevent($("form.layui-form"));
    form.on('select(filter)', function(data) {
        location.href = data.value
    });
});
</script>
{template file="member/footer.html"/}